home *** CD-ROM | disk | FTP | other *** search
- NAME pcint
- include pmacros.h
-
- dseg
- pubvar sssave,<dw ?>
- pubvar spsave,<dw ?>
- db 512 dup(?)
- pubvar intstk,<label byte>
- pubvar isat,<db 0>
- dsegend
-
- ; common routine for interrupt return
- pubproc doret
- pop es
- pop di
- pop si
- pop bp
- pop dx
- pop cx
- pop bx
- cmp isat@,1
- jnz notat ; Only one 8259, so skip this stuff
- mov al,0bh ; read in-service register from
- out 0a0h,al ; secondary 8259
- jmp short d1 ; Delay
- d1: in al,0a0h ; get it
- or al,al ; Any bits set?
- jz notat ; nope, not a secondary interrupt
- mov al,20h ; Get EOI instruction
- out 0a0h,al ; Secondary 8259 (PC/AT only)
- jmp short notat ; Delay
- notat: mov al,20h ; Get EOI instruction
- out 20h,al ; Primary 8259
- mov ss,sssave@
- mov sp,spsave@ ; restore original stack context
- pop ds
- pop ax
- iret
- pend doret
-
- end
-